package com.kaibo.roomdemo

import android.app.Application
import com.orhanobut.logger.*


/**
 * @author Administrator
 * @date 2018/2/7 0007 上午 9:55
 * GitHub：
 * email：
 * description：
 */

class App : Application() {

    companion object {
        private lateinit var INSTANCE: App

        fun getInstance(): App {
            return INSTANCE
        }
    }

    override fun onCreate() {
        super.onCreate()
        App.INSTANCE = this

        val prettyFormatStrategy = PrettyFormatStrategy.newBuilder()
                .tag("PRETTY")
                .build()

        Logger.addLogAdapter(object : AndroidLogAdapter() {
            override fun isLoggable(priority: Int, tag: String?) = BuildConfig.DEBUG
        })
/*        val csvFormatStrategy = CsvFormatStrategy.newBuilder()
                .tag("DISK")
                .build()
        Logger.addLogAdapter(DiskLogAdapter(csvFormatStrategy))*/


    }
}